package com.victualler.core.config.menu.dto.response;

import com.victualler.core.common.annotation.ListShowColumn;
import com.victualler.core.common.annotation.SimpleQuerySelect;
import com.victualler.core.common.enums.ColumnFormatEnum;

import java.io.Serializable;

/**
 * @Aouthor Guoshichang
 * @Date 11:45 on 2018/7/7.
 * @Function 通用查询对象
 */

public class MenuResponseDto implements Serializable{

    //图标
    @SimpleQuerySelect(specialName = "menu.id")
    @ListShowColumn(title = "菜单ID",sort = 0)
    private Long id;

    //图标
    @SimpleQuerySelect(specialName = "menu.img_Id")
    @ListShowColumn(title = "图标",sort = 1,type = ColumnFormatEnum.IMAGE)
    private Long imgId;
    //菜单名称
    @SimpleQuerySelect(specialName = "menu.name")
    @ListShowColumn(title = "菜单名称",sort = 2)
    private String name;

    //是否是可访问的节点
    @SimpleQuerySelect(specialName = "menu.page_Node")
    @ListShowColumn(title = "是否可达",sort = 3,type = ColumnFormatEnum.DICT,dictCodeType = "Boolean")
    private boolean pageNode;
    //父组件
    @SimpleQuerySelect(specialName = "menu.parent_Id")
    @ListShowColumn(title = "父菜单",sort = 4)
    private Long parentId;
    //顺序
    @SimpleQuerySelect(specialName = "menu.menu_desc")
    @ListShowColumn(title = "排序",sort = 5)
    private int desc;
    //权限的url
    @SimpleQuerySelect(specialName = "p.url")
    @ListShowColumn(title = "权限名称",sort = 6)
    private String url;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getImgId() {
        return imgId;
    }

    public void setImgId(Long imgId) {
        this.imgId = imgId;
    }

    public boolean isPageNode() {
        return pageNode;
    }

    public void setPageNode(boolean pageNode) {
        this.pageNode = pageNode;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public int getDesc() {
        return desc;
    }

    public void setDesc(int desc) {
        this.desc = desc;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
